package com.golden.thumbnail.callable;

import java.util.concurrent.Callable;

import com.golden.thumbnail.handler.IHandler;
import com.golden.thumbnail.handler.impl.ThumbnailHandler;
import com.golden.thumbnail.vo.TaskVO;

public class CompressCallable implements Callable<TaskVO>{
	
	private TaskVO taskVO = null;
	
	public CompressCallable(TaskVO taskVO) {
		this.taskVO = taskVO;
	}
	
	public TaskVO call() throws Exception {
		IHandler handler = new ThumbnailHandler();
		taskVO.setIsSuccess(handler.processor(taskVO.getInputPath(), taskVO.getOutPath(), taskVO.getFilename(), taskVO.getScaleList()));
		return taskVO;
	}
		
}
